<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>修改支付密码</title>
	<script src="__INDEX__/js/mui.min.js"></script>
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/style.css" />
		<link rel="stylesheet" href="__INDEX__/css/mall.css" />
		
	</head>

	<body >
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
			<h1 class="mui-title">修改支付密码</h1>
		</header>
		<div class="mui-content login_con">
			<form id='login-form' class="login_formbox" style="margin-top: 8%;">
				<div class="mui-input-row">
					<label><span class="iconfont icon-dianhua"></span></label>
					{if $user_info['mobile'] && count($user_info['mobile']>2)}
					<input id='mobile' type="text" value="{$user_info['mobile']}" class="mui-input" readonly="readonly" placeholder="请输入手机号码">
					{else}
					<input id='mobile' type="text" value="" class="mui-input-clear mui-input" placeholder="请输入手机号码">
					{/if}
				</div>
				<div class="mui-input-row">
					<label><span class=""></span></label>
					<input id='password' type="text" class="mui-input-clear mui-input" placeholder="请输入操作密码">
				</div>
				<div class="mui-input-row fl_yanzm">
					<div class="left clearfix">
						<label><span class="iconfont icon-yanzhengyanzhengma"></span></label>
						<input id='yzm' type="text" class="mui-input-clear mui-input" placeholder="请输入验证码">
					</div>
					<a href="javascript:;" id="send_code">获取验证码</a>
				</div>
			</form>
			<div class="mui-content-padded getpwd_btn">
				<button class="mui-btn mui-btn-block login_btn" id="btn">确认</button>
			</div>
		</div>
	</body>

</html>

{include file="public/footer" /}
<script type="text/javascript">
		function set_content(){
			var pwd=$("#pwd").val();
			var pwd1=$("#pwd1").val();
			var pwd2=$("#pwd2").val();
			if(pwd==''||pwd1==''||pwd2==''){
				layer.msg("请输入正确的密码");
				return;
			}
			if(pwd1!=pwd2){
				layer.msg("两次密码输入不一致");
				return;
			}
			$.ajax({
				type:"POST",
				url: "{:url('member/update_pwd2')}",
				data: {pwd:pwd,pwd1:pwd1},
				success: function(data) {
					if(data.code == 200){
						layer.msg('修改成功',function(){
							location.href = 'index.html';
						});
					}else{
						layer.msg('修改失败');
					}
				}
			})
		}
</script>
